#!/usr/bin/env python3

# 编码

# 文件操作

#r+ # 追加+读

#a   # 只能追加


# 集合

a = {1,2,4,5,7,9}
b = {1,3,2,3,4,5,6,7,8}

print(a & b)                        # 交集
print(a.intersection(b))            # 交集

print(a.intersection_update(b))     # 交集赋值
print(a)


print(a | b)

print(a - b)

print(b - a)

print(a ^ b)

print(a.difference(b))

print(a.difference_update(b))
print(a)

print(a.symmetric_difference(b))


